/* -----------------------------------------------------------------------------
*  CFileTxtIn
*  Author: Antonio Javier Gallego Sánchez (ajgallego AT gmail DOT com)
*  License: GNU Public License
* ----------------------------------------------------------------------------*/

#ifndef CFILETXTIN_HPP_
#define CFILETXTIN_HPP_

class CFileTxtIn
{
    public:
        CFileTxtIn( const char* filename );
        ~CFileTxtIn();

        bool eof() const;

        bool ungetChar();
        void ungetAll();

        unsigned int totalLines() const;
        unsigned int remainingLines() const;
        unsigned int totalBytes() const;
        unsigned int remainingBytes() const;

        char getChar();
        const char* getString();
        bool getBool();
        int getInt();
        unsigned int getUInt();
        double getDouble();

        class CVectorString* getVectorWithAllFileContent() const;
        const char* getStringWithAllFileContent( const char* separator ) const;

        void print() const;

    private:
        struct prv_fileIn_t *m_data;
};

#endif